Page Setups in AutoCAD / Architectural Desktop
Contents:1Page Setup Names | ||
Too much
time to set up Layouts Do you ever get tired of going through all of those options on the Page Setup and Plot dialogue boxes? It's a dumb question, right. I know, because it has got to be the single most common complaint I get from clients, students and even friends. Though I cannot solve all of the various problems working with Page Setups, I can save you a lot of time if you use the Page Setup Names. As illustrated to the right, the Page Setup Name drop-down list sits conspicuously in the upper right corner of the Page Setup and Plot dialogue boxes but does not readily communicate that is one of the most significant features within these dialogue boxes. Its function is to save all of the settings that you make on the Plot Device and Layout Settings tabs but the main problem, for many, is that they only appear to reside within the current drawing file and are not easily accessible for ALL drawing files. Importing Setup Names takes a bit of effort and most of us need for tasks like this to be fast and carefree because we know how the crunch comes down to plotting. Below, we will go through the steps required to create one master template file for Page Setup Names and then use a simple Lisp routine to make importing them fast and carefree. |
||
Author's
Hindsight Note: After writing this article, I realized that using the term "plot_configurations" for the concepts conveyed in this article may be a bit misleading given that we have .PC3 files that bear the same name. Therefore, you may want to use something like "page_configurations" for the template file and lisp routine discussed below. It will make no difference to AutoCAD or ADT but it might to you. |
||
2Page Setup Template File | ||
Save each
Page Setup with a Name The first thing we need to do is set up a simple drawing file with basically nothing in it. Next, we activate a Layout tab and use Page Setup to configure this Layout for a typical plotting scenario in your office. Once you have all of the options and parameters set on the Plot Device and Layout Settings tabs set just right, we can use the Page Setup Name Add... button to save this Page Setup Configuration. Once you have added all of the common office plotting configurations, we will need to save the current drawing with a very logical name to a very logical location. Think of this file as a type of template file. If you have template files in your office, maybe Saving this drawing to the same location will help to make the connection for others that it is, in fact, a type of template file. Illustrated to the right, I show that I have used the User Defined Page Setups dialogue box to create New page setup names of each full plot configuration. For example, I have 11x17 Setups for Black and White output and for Color output so that when I am in a major crunch for plotting time, I don't have to worry about the .ctb or .stb file being used. You may notice that I also have Setups for FAXing and e-mailing .PDF files. The only limit here is your imagination - or the permutations of plotters, pen tables, paper sizes, orientations, plot areas, scales and so on. Note: since there is no New or Add button on the User Defined Page Setups dialogue box, it might be confusing how to add a Setup; just type a name and use the OK button. |
||
Save the
Drawing File All of the Page Setup Names are now in the current drawing file, so we need to save it. Illustrated to the right, I show that I am saving my Page Setup Name template drawing to the default AutoCAD template folder. I also show that I have named mine "plot_configurations.dwg". Once this task is complete, we can move on to writing a little Lisp code to help bring it in faster and easier. You could stop here and simply use the Import... button on the User Defined Page Setups dialogue box every time you want to import your Page Setups but why not make it easier. |
||
3Page Setup loading with Lisp | ||
Writing
some Lisp code to load Page Setup Names faster The Lisp code to bring in Page Setup Names is actually very simple. We really wouldn't need any Lisp if it were not for the fact that we cannot trigger dialogue box options through command line statements unless AutoCAD has them designed for both methods; and Page Setups are not. This means that in our Lisp routine, we will turn off dialogue boxes temporarily so we can get the Page Setup Names loaded and then reactivate the dialogue boxes for normal use. We also need to define the command. Below I show the code and I have defined the routine as "PSN". This will be the command you can type in AutoCAD to load the Page Setups. If you don't like the name, simply change the PSN in your text editor. Notice the path statement below; make sure it matches where you save the template drawing file for your Setup Names. (DEFUN C:PSN () (setq expert (getvar "EXPERT")) (setvar "EXPERT" 2) (command "._-PSETUPIN" "C:/Program Files/AutoCAD 2002/Template/plot_configurations.dwg" "*") (setvar "expert" expert))
Use Notepad or an equivalent text editor to create a blank text file with the code from above. Save the file as "plot_configurations.lsp" in a folder where you store all of your other lisp routines. If you don't have custom lisp files, then save this file to the Support directory of AutoCAD; C:\Program Files\AutoCAD 2002\Support, for example. |
||
Loading the
Code into AutoCAD There are several ways to load a lisp routine into AutoCAD or ADT. Since I don't want to risk affecting the primary Lisp files that load automatically with AutoCAD, I will just show how you can use the Appload command to have this routine load. For the more experienced users and programmers, you can obviously just add this code to your own list of lisp routines. Illustrated to the right, I show the Load/Unload Applications dialogue box acquired by typing "AppLoad" on the command line. For single time use or testing, you can load the lisp routine we just created on the File name list and use the Load button to bring it into AutoCAD. For automatic loading all of the time, you can use the Contents... button under the Startup Suite.
|
||
Loading the
Code into AutoCAD When you Add... your custom Lisp routine via the Contents... button, your routine will automatically load every time you launch AutoCAD or ADT. |
||
Check the
results When you load AutoCAD or ADT, you should now find that you have a new command that you can type on the command line: "PSN". If everything was done without errors, you should find that when you go to the Page Setup Name drop-down list on the Page Setup or Plot dialogue boxes, all of your custom plot configurations are now available. I particularly enjoy this routine when I deal with legacy files that don't have any Layouts in them or when I receive files from other offices that have been configured for their plotters, pen settings, paper sizes and a bunch of other stuff that I don't have. For an update (2010) to this article see AutoCAD and "Page Setup Import" Revisited |
© Copyright 2001 ARCHIdigm. All rights reserved.